import PowerChart from "./components/power";
import Statistics from "./components/statistics";
import "./index.scss";
export default defineComponent({
	props: [],
	emits: [],
	setup(props, ctx) {
		let statisticsRef = ref();
		const init = () => {
			statisticsRef.value.init();
		};
		ctx.expose({
			init
		});
		return () => {
			return (
				<div class="grid grid-cols-2 gap-6 pl-8 pr-8 pt-8">
					<div class="report-item">
						<div class="title-block">
							<div class="text">近三十日用电统计</div>
						</div>
						<Statistics ref={statisticsRef} />
					</div>
					<div class="report-item">
						<div class="title-block">
							<div class="text">近三十日电源负荷</div>
						</div>
						<PowerChart />
					</div>
				</div>
			);
		};
	}
});
